import { baseService } from '@/request';

export function getCaptchaImage<T>(params: T, key: string) {
  return baseService({
    url: `allInOne/sys/randomImage/${key}`,
    method: 'get',
    params,
  });
}

export function userLogin<T>(data?: T) {
  return baseService({
    url: 'allInOne/sys/login',
    method: 'post',
    data,
  });
}

export function getUserRole<T>(params?: T) {
  return baseService({
    url: 'allInOne/sys/permission/getUserPermissionByToken',
    method: 'get',
    params,
  });
}
